import 'package:json_annotation/json_annotation.dart';
part 'api_response.g.dart';

@JsonSerializable(genericArgumentFactories:true)
class ApiResponse<T>{
  final T? data;
  final int status;
  final String message;

  ApiResponse({
    required this.data,
    required this.status,
    required this.message,

  });

  factory ApiResponse.fromJson(
      Map<String,dynamic> json,
      T Function(Object? json) fromJsonT,
      )=>_$ApiResponseFromJson(json,fromJsonT);
}